import Vue from 'vue'
import Router from 'vue-router'
import AdminLayout from '@/pages/admin/layout'




Vue.use(Router)


export default new Router({
  routes: [{
      path: '/login',
      name: 'login',
      component: (resolve) => require(['@/pages/admin/login'], resolve),
    },
    {
      path: '/admin',
      component: AdminLayout,
      children: [{
          path: '/admin/index',
          name: 'amdin-index',
          component: (resolve) => require(['@/pages/admin/index'], resolve),
          meta: {
            title: "首页"
          }
        },
        {
          path: '/admin/book/list',
          name: 'admin-book-list',
          component: (resolve) => require(['@/pages/admin/book/list'], resolve),
          meta: {
            title: "课本管理"
          }
        },
        {
          path: '/admin/book/detail',
          name: 'admin-book-detail',
          component: (resolve) => require(['@/pages/admin/book/detail'], resolve),
          meta: {
            title: "内容管理"
          }
        }
      ]
    }
  ]
})
